﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KHOALUAN
{
    public partial class frmKhoa : Form
    {
        public frmKhoa()
        {
            InitializeComponent();
            clsMain.cls.KhoiTaoXMLTable(clsMain.FormKhoa, 3);
            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].ColumnName[0] = "MÃ SỐ KHOA";
            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].ColumnName[1] = "TÊN KHOA";
            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].ColumnName[2] = "GHI CHÚ";

            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].Names[0] = "MSKH";
            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].Names[1] = "TENKH";
            clsMain.cls.clsForm.xmlD[clsMain.FormKhoa].Names[2] = "GHICHU";
        }

        private void frmKhoa_Load(object sender, EventArgs e)
        {
            clsMain.cls.KhoiTaoFormControls(clsMain.FormKhoa);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormKhoa, dgv);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormKhoa, but);
        }

        private void dgv_MouseDoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.AddDataToControls(clsMain.FormKhoa);
        }

        private void but_Click(object sender, EventArgs e)
        {
            clsMain.cls.ButtonsClick(clsMain.FormKhoa, but.ClickState);
        }
    }
}
